<?php get_header() ?>
<?php
$option = get_option('tvpresident_1_settings');
?>
<div id="content">
        <div class="ngangborder"></div>
        <div class="left-content">
          
          <div style="clear:both"></div>
            
        
          
          <div class="divlist">
            <div class="divtitle">Site Map </div>
              <div class="ngangborder"></div>
	          <div class="divcontent page">
	              <div class="sitemap-top">
					<?php $i=0; $categories = get_categories(array('hide_empty'=>0,'parent'=>0));
					   foreach ($categories as $category) { ?>
					   <?php if($category->cat_ID!=1){ ?>
					   <?php if(strpos($category->slug,'footer')===0||strpos($category->slug,'slide')===0) continue; ?>
					   <ul class="sitemap-bottom">
							<li style="text-transform:uppercase;font-size:14px;"><a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->cat_name; ?></a></li>
							<?php wp_reset_query();
							query_posts(array('category__in' => array($category->cat_ID)));
							if (have_posts()) { ?>
							<ul>
							   <?php while (have_posts()): the_post();
									?>
									<li>
										<a href="<?php the_permalink() ?>" class="news_title"><?php the_title() ?></a>
									</li>

									<?php
								endwhile; ?>
							</ul>
						   <?php } ?>
						</ul>
						<?php $child_categories = get_categories(array('parent'=>$category->cat_ID,'hide_empty'=>0));
						foreach ($child_categories as $child_category) { ?>
						<ul class="sitemap-bottom">
							<li><a href="<?php echo get_category_link($child_category->cat_ID); ?>"><?php echo $child_category->cat_name; ?></a></li>
							<?php wp_reset_query();
							query_posts(array('category__in' => array($child_category->cat_ID)));
							if (have_posts()) { ?>
								<ul>
								<?php while (have_posts()): the_post();?>
									<li>
										<a href="<?php the_permalink() ?>" class="news_title"><?php the_title() ?></a>
									</li>

									<?php
								endwhile; ?>
								</ul>
							<?php } ?>
							</ul>
						<?php } ?>
						<?php if(($i+1)%4==0){ ?><div class="clear"></div><?php } ?>
						<?php $i++; } ?>
					<?php } ?>
				</div>
				<div style="clear:both;"></div>
	          </div>
          </div>
         
        </div>
        <div class="right-content">
          <?php get_sidebar() ?>
        </div>
        <div style="clear:both"></div>
      </div>
      <div style="clear:both;"></div>
<?php get_footer() ?>